Repository navigation
pkgs/id crate split step 3b: extract id-sync (log_sync, protocol, fileops, dht, meta_client wire half) (#4406) - #8730
Merged
Merged
Conversation
…eops, dht, meta_client wire half) (#4406)
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 6 minutes. View limit details
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. |
This was referenced Nov 11, 2026
Closed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Step 3b of the pkgs/id crate split (#4406): create the
id-synccrate and move the wire/sync layer into it.What moved into
pkgs/id/crates/id-synclog_sync— the p2panda log/range sync sessions (SYNC_ALPN,SyncProtocol,sync_with,answer).protocol— the meta protocol (wire types,MetaProtocol,match_kind,META_ALPN, now defined here and re-exported by the facade).fileops— blob file operations (FileOps).dht— mainline DHT discovery (behind id-sync'sdhtfeature, forwarded by the facade'sdhtfeature).meta_clientwire half —MetaRequester,request_over,read_capped_response,expect_ok,capped_response_error,MAX_RESPONSE_BYTES,META_RESPONSE_TIMEOUT.Historical paths are preserved: the facade re-exports every moved module (
id::log_sync,id::protocol,id::fileops,id::dht,id::meta_client,id::META_ALPN,id::protocol::match_kind), so no caller changed.Design points
SharedEventStore<S>left for it):SyncProtocol<S>,sync_withandanswertake&SharedEventStore<S>withS: EventStoreBackend; the range arm additionally requiresSharedEventStore<S>: RangeStore(implemented for the concrete store in id-events). The facade instantiatesS = EventStorethrough its existing alias, unchanged. Tests inside id-sync alias the concrete store.MetaClientenum,open/connect_node/close, and itsMetaRequesterimpl are built fromcommands::client/commands::serve+LocalNode, which live above id-sync. Only the transport half moved — a narrower deferral than the full meta_client deferral the design allows; noted on pkgs/id crate split — step 3: extract id-sync (log_sync + wire layer; artifact lands here) #4406.LocalNodeor the facade's hub stayed in the facade thin files — the protocol handler-behaviour tests (which inject a deadline wrapper aroundMetaProtocol) and fileops' LocalNode-backed suites. log_sync's pull-gate tests now use small fixtures local to id-sync (a live-setWorldAccessand a stubBlockListin a#[cfg(test)]module) instead of the facade'spull_policy::testing.MetaProtocol::accept_connectionispub,protocol::MAX_META_STREAMS_PER_CONNECTIONispub,FileOps::validate_nameispub. Production call paths unchanged.id_sync::paths.Verification
cargo test --no-fail-fast): 3,693 passed / 1 failed / 33 ignored; sole failureframes::tests::byte_refusal_does_not_spend_a_frame_token_or_increment_counters(pkgs/id: frames byte_refusal test fails deterministically on main (RequestTooLarge vs BudgetExhausted) #8620, pre-existing). 106 unrelated main commits landed between that baseline and this branch's base (40043bc); a name-level diff of the two runs shows every moved-module test present and passing in this branch, the 11 extra tests coming from those main commits.id::paths and failed; fixed toid_sync::and re-verified (id-sync: 65 lib tests + 5 doctests pass; facade doctests 9 passed / 13 ignored).sha256sum pkgs/id/src/sandbox.rsunchanged (db88ec8d52e961702353c97a407b77badadef1bd7e0a610a6075267e175d80b5);print_fuel_baselineoutput byte-identical (72 lines, sha25659cfad49c7553c8309a8b40b23405321399bb76bb741acaeb90f78570f45c32c).nix build ./pkgs/id#id-lib, no overrides): same outcome as step 3a — the check phase passes the lib suites and fails only atcli_tests::world_new_scaffold_compiles_with_pinned_rocintests/cli_integration.rs("Roc cache writes are failing / AccessDenied" inside the Nix sandbox). That is the latent sandbox-environment failure unmasked in 3a (the baseline check phase stops earlier, at the pkgs/id: frames byte_refusal test fails deterministically on main (RequestTooLarge vs BudgetExhausted) #8620 failure, and never reaches this test); the test passes outside the sandbox and its inputs are untouched by this PR.cargo-target-broker execcurrently crashes (sqlite3.IntegrityError: UNIQUE constraint failed: dirs.path; all pooled dirs for the fingerprint are leased by other fleet work), so a freshCARGO_TARGET_DIRwas used for the local runs instead.Open in [code]smith · Need help on this PR? Tag
@codesmith-botwith what you need.